// uapi.js
const install = (Vue, vm) => {
  let getInfo = async () => {
    let res = await vm.$u.get('/info')
    return res
  }

  let getInfoById = async (id) => {
    let res = await vm.$u.get('/info?id=' + id)
    return res
  }

  vm.$u.api = {
    getInfo,
    getInfoById
  }
}

export default {
  install
}
